//
// Created by lvyer on 2021/11/29.
//

#ifndef LEARNOPENGL_GLTOOLS_H
#define LEARNOPENGL_GLTOOLS_H

#include <GLES3/gl3.h>
#include <string>
#include <tools/LogTools.h>

class GLTools {
public:
    static GLuint createProgram(const char *pVertexShaderSource, const char *pFragShaderSource);

    static GLuint createProgram(const char *pVertexShaderSource, const char *pFragShaderSource,
                                GLuint &vertexShaderHandle,
                                GLuint &fragShaderHandle);

    static GLuint loadShader(GLenum shaderType, const char *pSource);

    static void deleteProgram(GLuint &program);

    static void checkGLError(const char *pGLOperation);

};


#endif //LEARNOPENGL_GLTOOLS_H
